package cn.enjoy.design.behavior.strategy.abClass;

import cn.enjoy.design.behavior.strategy.abClass.A.Context;
import cn.enjoy.design.behavior.strategy.abClass.B.DSOrderServiceImpl;
import cn.enjoy.design.behavior.strategy.abClass.B.SXOrderServiceImpl;
import cn.enjoy.design.behavior.strategy.abClass.entity.DSOrder;
import cn.enjoy.design.behavior.strategy.abClass.entity.SXOrder;

/**
 * @author K
 * @date 2021/11/16 20:41
 */
public class StrategyTest {
    public static void main(String[] args) {
        DSOrder dsOrder = new DSOrder();
        dsOrder.setExpressInfoId(1L);
        dsOrder.setId(1L);
        dsOrder.setProductItemId(1L);
        dsOrder.setUserId(1L);
        Context<DSOrder> dscontext = new Context<DSOrder>(new DSOrderServiceImpl());
        dscontext.createOrder(dsOrder);

        SXOrder sxOrder = new SXOrder();
        sxOrder.setHeadId(2L);
        sxOrder.setId(2L);
        sxOrder.setProductItemId(2L);
        sxOrder.setUserId(2L);


        Context<SXOrder> sxcontext = new Context<SXOrder>(new SXOrderServiceImpl());
        sxcontext.createOrder(sxOrder);
    }
}
